package com.wavefront.obj.parser.line;

import com.wavefront.obj.elements.VertexN;
import com.wavefront.obj.parser.LineParser;
import com.wavefront.obj.parser.ObjParser;

public class NormalParser extends LineParser {

	VertexN vertex = null;

	@Override
	public void parse(String[] words) {
		super.parse(words);
		vertex = ObjParser.currentModel.createVertexN();
		try {
			vertex.setI(Float.parseFloat(words[1]));
			vertex.setJ(Float.parseFloat(words[2]));
			vertex.setK(Float.parseFloat(words[3]));
		} catch (Exception e) {
			throw new RuntimeException("NormalParser Error");
		}

	}

}
